﻿<%@ Page Language="C#" validateRequest="false" AutoEventWireup="true" CodeBehind="a0.aspx.cs" Inherits="hcms.Templates.a0" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
	<title>驾驶技术网 | 搜索</title>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<link href="/Styles/Site.css" rel="stylesheet" type="text/css" />
	<script src="/Scripts/jquery.min.161.js" type="text/javascript"></script>
	<script src="/Scripts/jquery.simplemodal.1.4.3.min.js" type="text/javascript"></script>
	<script src="/Scripts/comm.js" type="text/javascript"></script>
	<script src="/Scripts/site.js" type="text/javascript"></script>
	<!-- 板块js -->
	<script src="/Templates/parts.js" type="text/javascript"></script>
	<style type="text/css">
		.list { width:100%; }
		.list th { border-bottom: dotted 1px #aaa; text-align:left; }
		.list td, .list th { padding:3px 0px 1px 16px; }
		.list tr:nth-child(even) td { background-color: #f6f6f6; }
		#pager { border-top: dotted 1px #aaa; text-align:left; }
#prompt { font-weight: normal; }
	</style>
	<script type="text/javascript">
		var pagerows = 30; // 每页行数

		$(function () {
			getsearch(0);
		});

		function getsearch(page) {
fillBlank();
			var prompts = {}; // 初始化Ajax.aspx的哈希表参数。
			prompts["pagerows"] = pagerows; // 每页行数
			prompts["searchpage"] = page; 		// 当前页
			$.getJSON("/Ajax.aspx?" + Date(), prompts, // 地址加一个日期参数，强制更新。
				function (data) {
					fill(data);
				}
			);
		}

		function fill(data) {
			var rows = data["rows"];
			var pages = data["pages"];
			var m = 4; // 每行四个数
			var n = rows.length / m;
			var str = "<tr><th class='w150'>发布日期</th><th>文章标题</th>";
			// 格式化文章。
			var i = 0;
			for (; i < n; i++) {
				str += "<tr><td>" + rows[m * i + 0] + "</td><td><a href='/Articles/" + rows[m * i + 1] + "-" + rows[m * i + 2] + ".htm'>" + rows[m * i + 3] + "</td></tr>";
			}
			for (; i < pagerows; i++)	//补一些空行
				str += "<tr><td>&nbsp;</td><td>&nbsp;</td></tr>";
			$(".list").html(str);
			$("#prompt").html("共 " + data["count"] + " 项");

			HPages(
				{ ctrlid: "#pager",
					page: data["page"] - 1, // 要显示的页号，从0开始。
					pages: data["pages"],
					pagenu: 13, // 底部显示13个页号
					gopage: function (pa) {
						getsearch(pa);
					}
				});
		}

function fillBlank(){
			$("#prompt").html('<img src="/images/waiting.gif" />&nbsp;&nbsp;载入数据，请稍候。');

			var str = "<tr><th class='w150'>发布日期</th><th>文章标题</th>";
			// 格式化文章。
			var i = 0;
			for (; i < pagerows; i++)	//补一些空行
				str += "<tr><td>&nbsp;</td><td>&nbsp;</td></tr>";
			$(".list").html(str);
}
	</script>
</head>

<body>
	<form id="form1" class="page" runat="server">
	<%-- 页眉板块 --%>
	<script type="text/javascript">		document.write(jsonparts["10"]);</script>
	<!-- left menu -->
	<div class="pageleft">
		<!-- 热点推荐 -->
		<script type="text/javascript">			document.write(jsonparts["13"]);</script>
		<div class="separation10"></div>
		<script type="text/javascript"><!--
			google_ad_client = "pub-2733994180506707";
			/* 160x600, 创建于 10-6-3 */
			google_ad_slot = "6252507617";
			google_ad_width = 160;
			google_ad_height = 600;
		//-->
		</script>
		<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script>
	</div>
    <div class="pageright">
	<!-- 搜索 -->
	<%--<div id="htmsearch"></div>
	<script type="text/javascript">$("#htmsearch").html(jsonparts["17"]);</script>
	<script type="text/javascript">$("#htmsearch")[0].innerHTML=jsonparts["17"];</script>--%>
	<script type="text/javascript">document.write(jsonparts["17"]);</script>
		<div class="separation10"></div>
		<script type="text/javascript"><!--
			google_ad_client = "pub-2733994180506707";
			/* 160x600, 创建于 10-6-3 */
			google_ad_slot = "6252507617";
			google_ad_width = 160;
			google_ad_height = 600;
		//-->
		</script>
		<script type="text/javascript"
		src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
		</script>
	</div>
	
	<div class="column650">
		<div class="combox">
			<h5><a href="/">首页</a>
			<% foreach (System.Data.DataRow row in posrows)
		 { %>&gt;&gt; <a href="/ColumnList.aspx?cid=<%=row["colID"]%>"><%=row["colName"]%></a>
			<%
		 } %> &gt;&gt; <%=arow["artTitle"]%>　　<span id="prompt"><img src="/images/waiting.gif" />&nbsp;&nbsp;载入数据，请稍候。</span>
			</h5>
	<table class="list" cellpadding="0" cellspacing="0">
	</table>
	<div class="separation10"></div>
	<div id="pager"></div>
	<%--<div class="separation10"></div>
	<script type="text/javascript">
		HPages(
	{ ctrlid: "#pager",
		page: $("#htmPage").val(), // 要显示的页号，从0开始。
		pages: $("#htmPages").val(),
		pagenu: 13, // 底部显示13个页号
		gopage: function (pa) {
			window.location = "t8.aspx?page=" + pa;
		}
	});

	</script>--%>
		</div>
	</div>
	<div class="separation10"></div>		
	<!-- 页脚 -->
	<script type="text/javascript">		document.write(jsonparts["15"]);</script>
	</form>
</body>
</html>
